
<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml"
      xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>账单详情</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
          name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--插件样式-->
    <link rel="stylesheet" href="/dist/plugins/select2/select2.min.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=39cd89cd">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <style>
        .table > tbody > tr > td {
            line-height: 24px;
            max-height: 24px;
            overflow: hidden;
        }

        span.lineOne {
            line-height: 28px;
            height: 28px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
        }

        .div-td-content-more {
            height: auto;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
        }
        .divCheck{
            height: 100%;
            margin-left: 5px;
            line-height: 25px;
        }
        .divCheck input{
            float: left;
            margin-top: 7px;
            margin-right: 5px;
        }
        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }
        body{
            background: #F5F5F7;
        }
        .basicMessage{
            width:100%;
            height:auto;
            background: #fff;
            margin-bottom: 5px;
            line-height: 20px;
        }
        .basicMessage .brand{
            font-size: 20px;
            font-weight: bold;
            padding-left: 5px;
        }
        .basicMessage .num{
            color: #999B99;
            padding-left: 5px;
            border-bottom: 1px dotted #F8F8F8;
        }
        .basicMessage .price{
            font-size: 18px;
            color: #DC7935;
            font-weight: bold;
            padding-left: 5px;
        }
        .basicMessage .type{
            padding-left: 5px;
        }
        .basicMessage .phone{
            padding-left: 5px;
        }
        .btns{
            width: 100%;
            height:40px;
            line-height: 40px;
            background: #fff;
            text-align: center;
            display: flex;
            justify-content: space-around;
            margin-bottom: 10px;
            /*border-bottom: 1px solid #2a8cec;*/
        }
        .finish{
            width:50%;
            color: #2a8cec;
            border-bottom: 1px solid #2a8cec;
        }
        .unFinish{
            width:50%;
            text-align: center;
        }
        .month{
            width:100%;
            height:40px;
            line-height: 40px;
            background: #fff;
            display: flex;
            justify-content: space-between;
            border-bottom: 1px solid #F8F8F8;
        }
        .monthDan{
            padding-left: 5px;
            text-align: left;
        }
        .data{
            color: gray;
            text-align: right;
            padding-right: 5px;
        }
        .moneyList{
            width:100%;
            line-height: 30px;
            /*text-align: center;*/
            margin:0 auto;
            background: #fff;
            position: relative;
        }
        .moneyList .left{
            width:50%;
            text-align: center;
            border-right: 1px solid #F8F8F8;
            line-height: 25px;
        }
        .moneyList .middle{
            width:50%;
            text-align: center;
            border-right: 1px solid #F8F8F8;
            line-height: 25px;
        }
        .moneyList .right{
            width:50%;
            text-align: center;
            float: right;
            background: #fff;
            position: absolute;
            top:15px;
            right:0;
            margin:30px auto;
        }
        .moneyList .right .money{
            font-size: 26px;
            font-weight: bold;
        }
        .shouldMoney{
            color: red;
        }
        /*.monthFinish{*/
        /*width:100%;*/
        /*height:40px;*/
        /*line-height: 40px;*/
        /*background: #fff;*/
        /*display: flex;*/
        /*justify-content: space-between;*/
        /*!*margin:10px auto;*!*/
        /*border-top: 1px solid #f8f8f8;*/
        /*border-bottom: 1px solid #f8f8f8;*/
        /*}*/
        /*.monthMoney{*/
        /*padding-left: 5px;*/
        /*}*/
        /*.monthFinish .money{*/
        /*font-size: 12px;*/
        /*padding-right: 5px;*/
        /*font-weight: normal;*/
        /*}*/
        .customer{
            width:100%;
            background: #fff;
            text-align: center;
            padding:5px 0;
            border-bottom: 1px solid #f8f8f8;
            display: flex;
            justify-content: space-between;
            border-top: 1px solid #f8f8f8;
        }
        .customer .money{
            font-size: 12px;
            font-weight: normal;
        }
        .customer p{
            margin:10px auto;
        }
        .customer .left{
            border-right: 1px solid #F8F8F8;
            padding: 0 28px;
        }
        .customer .middle{
            border-right: 1px solid #F8F8F8;
            padding: 0 28px;
        }
        .customer .right{
            padding: 0 28px;
        }
        .title{
            height:25px;
            line-height: 25px;
            text-align: center;
            border-bottom: 1px solid #F8F8F8;
        }
        .history{
            width:100%;
            height:auto;
            background: #fff;
            border-radius: 20px;
        }
        .historyMoney{
            width:100%;
            line-height: 40px;
            padding:0;
            margin:0;
            /*border-bottom: 1px solid #F8F8F8;*/
            display: flex;
            justify-content: space-between;
        }
        .historyMoney .month{
            float: left;
            border-bottom: none;
            line-height: 40px;
            padding-left: 50px;
        }
        .historyMoney .money{
            float: right;
            font-size: 12px;
            font-weight: normal;
            padding-right: 50px;
        }
        li{
            list-style: none;
        }
        .table{
            background: #fff;
            border: 1px solid #fff;
            overflow:hidden;
            border-top-left-radius:15px;
            border-top-right-radius:15px;
            border-bottom-right-radius:15px;
            border-bottom-left-radius:15px;
        }
        .table-bordered>thead>tr>th, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>tbody>tr>td, .table-bordered>tfoot>tr>td {
            border: 1px solid #fff;
        }
        .table .td-title{
            background:#fff;
        }
        .table .td-title{
            line-height: 24px;
            text-align: center;
        }
        .table .td-module{
            line-height: 24px;
            text-align: center;
            background: #F8F8F8;
            border: 1px solid #F8F8F8;
        }
        .table .td-value{
            line-height: 24px;
            text-align: center !important;
        }
        .table .td-title1{
            text-align: center;
            line-height: 24px;
        }
        .table .td-value1{
            text-align: center;
            line-height: 24px;
            color: #2a8cec;
            padding-right: 10px;
        }
        .box{
            width:25%;
            border:1px solid #F8F8F8;
            margin:0 auto;
            position: relative;
        }
        .titles{
            height:24px;
            line-height: 24px;
            position: absolute;
            top:20px;
            left:50px;
        }
        .titles .phone{
            position: absolute;
            top:0;
            left:70px;
            border:1px solid #F8F8F8;
            padding:0 5px;
        }
        .titles1{
            height:24px;
            line-height: 24px;
            position: absolute;
            top:60px;
            left:50px;
        }
        .row{
            display: flex;;
            justify-content: space-around;
        }
        .borders{
            width:250px;
            height:50px;
            border:1px solid red;
            position: relative !important;
            top:-125px;
            margin:0 auto;
        }
        .pot{
            width: 80px;
            text-align: right;
            display: block;
            margin-left: 50px;
        }
        .pots{
            text-align: left;
            width:120px;
            display: block;
            margin-left: 50px;
        }
    </style>
</head>
<body>
<section class="content" id="app" v-cloak>
    <div class="div-td-content-more"><i></i></div>
    <div class="row">
        <div class="col-md-9" style="width: 375px;">
            <div class="box-body iframeH2" style="overflow: auto;" id="scrollDiv">
                <!--<div class="basicMessage">-->
                <!--<p class="brand">挖掘机 利勃海尔 ES210C</p>-->
                <!--<p class="num">序列号: <span>44774</span></p>-->
                <!--<p class="price">2,480,000.00</p>-->
                <!--<p class="type">付款方式: <span>内部分期</span></p>-->
                <!--<p class="phone">区域经理电话: <span>13333101558</span></p>-->
                <!--</div>-->
                <div class="title">本月到期款信息</div>
                <table class="table table-bordered text-center">
                    <tr>
                        <td class="td-title1">到期日期</td>
                        <td class="td-value1">{{message.sender.repaymentDate}}</td>
                    </tr>
                    <tr>
                        <td class="td-title1">到期金额</td>
                        <td class="td-value1">{{fmoney(message.repaymentMoney.total)}}</td>
                    </tr>
                    <tr>
                        <td class="td-title1">已还金额</td>
                        <td class="td-value1">{{fmoney(message.repaymentMoney.repaymentAmount)}}</td>
                    </tr>
                    <tr>
                        <td class="td-title1">往期欠款</td>
                        <td class="td-value1">{{fmoney(message.repaymentMoney.allRemaring)}}</td>
                    </tr>
                    <tr>
                        <td class="td-title1">逾期罚息</td>
                        <td class="td-value1">{{fmoney(message.repaymentMoney.allOverDue)}}</td>
                    </tr>

                </table>
                <div class="borders"></div>
                <div class="title" style="margin-top: -50px;">基本信息</div>
                <table class="table  table-bordered text-center">
                    <tr>
                        <td class="td-title">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</td>
                        <td class="td-value">{{message.sender.customerName}}</td>
                        <td class="td-title">电&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;话</td>
                        <td class="td-value">{{message.sender.customerTel}}</td>
                    </tr>
                    <tr>
                        <td class="td-title">设备类型</td>
                        <td class="td-value">{{message.sender.deviceName}}</td>
                        <td class="td-title">品&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;牌</td>
                        <td class="td-value">{{message.sender.brandName}}</td>
                    </tr>
                    <tr>
                        <td class="td-title">型&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</td>
                        <td class="td-value">{{message.sender.modelName}}</td>
                        <td class="td-title">序&nbsp;列&nbsp;号</td>
                        <td class="td-value">{{message.sender.serialNo}}</td>
                    </tr>
                    <tr>
                        <td class="td-title">付款方式</td>
                        <td class="td-value">{{message.sender.buyType}}</td>
                        <td class="td-title">购买价格</td>
                        <td class="td-value">{{fmoney(message.sender.totalPrice)}}</td>
                    </tr>
                </table>
                <div class="title">还款信息汇总</div>
                <table class="table table-bordered text-center">
                    <tr>
                        <td class="td-title1"><span class="pot">总欠款金额</span></td>
                        <td class="td-value1"><span class="pots">{{fmoney(message.sender.totalCustomerArrears)}}</span></td>
                    </tr>
                    <tr>
                        <td class="td-title1"><span class="pot">累计还款</span></td>
                        <td class="td-value1"><span class="pots">{{fmoney(message.sender.accumulatedRepaymentAmount)}}</span></td>
                    </tr>
                    <tr>
                        <td class="td-title1"><span class="pot">剩余应还</span></td>
                        <td class="td-value1"><span class="pots">{{fmoney(message.sender.totalCustomerArrears-message.sender.accumulatedRepaymentAmount)}}</span></td>
                    </tr>
                </table>

                <div class="title">历史还款记录</div>
                <table class="table table-bordered text-center">
                    <tr v-for="(item,i) in message.repaymentList">
                        <td class="td-title1"><span class="pot">{{item.availableDate}}</span></td>
                        <td class="td-value1"><span class="pots">{{fmoney(item.availableMoney)}}</span></td>
                    </tr>
                </table>
            </div>
        </div>

    </div>

</section>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=7e54a132"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=558d0414"></script>
<script src="/page/apply/contract/Template.js?t=42e28def"></script>

<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script>
    var app = new Vue({
        el:"#app",
        data:{
            id: $.wyui.page.urlParams.id ? $.wyui.page.urlParams.id : '',
            repaymentDate: $.wyui.page.urlParams.repaymentDate,
            message:{
                comName: "",
                content: "",
                customerTel: "",
                repaymentList:[],
                repaymentMoney:{
                    repaymentAmount: "",
                    surplusAmount:"" ,
                    total: ""
                },
                sender: {
                    accumulatedRepaymentAmount: "",
                    arrearsRepaymentAmount: "",
                    brandName: "",
                    buyType: "",
                    companyName: "",
                    customerName: "",
                    customerTel: "",
                    deviceName: "",
                    modelName: "",
                    repaymentDate: "",
                    serialNo: "",
                    totalCustomerArrears: "",
                    totalPrice: 0
                }
            },


        },
        methods:{
            trim:function(str){
                console.log(str)
                console.log(str.replace(/\s+/g," "))
                return str.replace(/\s+/g,"");
            },
            goSend:function(){
                var that = this;
                if (confirm("确认发送吗？")==true){
                    $.wyui.postMethod("/contractMain/senderMessage.json", {
                        comName: that.message.comName,
                        content: that.message.content,
                        customerTel: that.message.customerTel,
                        mainId:that.id
                    }, function (data) {

                        alert("发送成功")
                    });
                }

            },
            fmoney: function (s, n) {

                n = n > 0 && n <= 20 ? n : 2;
                s = parseFloat((s + "").replace(/[^\d\.-]/g, "")).toFixed(n) + "";
                var l = s.split(".")[0].split("").reverse(), r = s.split(".")[1],
                    t = "";
                for (i = 0; i < l.length; i++) {
                    t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
                }
                var str = t.split("").reverse().join("") + "." + r;
                str = str.replace("-,", "-")
                return str;
            },
        },
        mounted:function () {
            var that = this;
            $.wyui.postMethod("/receivable/getRepaymentSender.json", {mainId: that.id,repaymentDate:that.repaymentDate}, function (data) {
                that.message=data;

            });

        }
    })
</script>
</body>
</html>